// 工单管理api
import request from '@/utils/request'
// 工单状态统计 获取用户工作量(工单统计)
export const condition = (start, end) => {
  return request({
    url: `/api/task-service/task/taskReportInfo/${start}/${end}`
  })
}
// 获取工单详情 taskId工单id
export const jobDetails = (taskId) => {
  return request({
    url: `/api/task-service/task/taskInfo/${taskId}`
  })
}
// 工单搜索
export const searchApi = (params) => {
  return request({
    url: `/api/task-service/task/search`,
    params
  })
}
// 新增工单
export const addWorkOrder = (data) => {
  return request({
    url: '/api/task-service/task/create',
    method: 'POST',
    data
  })
}
// 取消工单（删除）
export const delWork = (taskId, data) => {
  return request({
    url: `/api/task-service/task/cancel/${taskId}`,
    method: 'POST',
    data
  })
}
